<?php

use think\facade\Route;

/* 分类 */

Route::rule('typeList', 'type/list', 'GET')->allowCrossDomain();
Route::rule('addType', 'type/add', 'POST')->allowCrossDomain();
Route::rule('editType', 'type/edit', 'GET')->allowCrossDomain();
Route::rule('modifyType', 'type/modify', 'PUT')->allowCrossDomain();
Route::rule('modifyTypeName', 'type/modifyName', 'PUT')->allowCrossDomain();
Route::rule('deleteType', 'type/delete', 'DELETE')->allowCrossDomain();
Route::rule('getType', 'type/getOne', 'GET')->allowCrossDomain();

/* 会员 */
Route::rule('userList', 'user/list', 'GET')->allowCrossDomain();

/* 通知 */
Route::rule('noticeList', 'notice/list', 'GET')->allowCrossDomain();
Route::rule('addNotice', 'notice/add', 'POST')->allowCrossDomain();
Route::rule('editNotice', 'notice/edit', 'GET')->allowCrossDomain();
Route::rule('modifyNotice', 'notice/modify', 'PUT')->allowCrossDomain();
Route::rule('deleteNotice', 'notice/delete', 'DELETE')->allowCrossDomain();

/* 投稿 */
Route::rule('contributeList', 'contribute/list', 'GET')->allowCrossDomain();
Route::rule('deleteContribute', 'contribute/delete', 'DELETE')->allowCrossDomain();

/* 意见 */
Route::rule('suggestList', 'suggest/list', 'GET')->allowCrossDomain();
Route::rule('deleteSuggest', 'suggest/delete', 'DELETE')->allowCrossDomain();

/* 视频 */
Route::rule('videoList', 'video/list', 'GET')->allowCrossDomain();
Route::rule('addVideo', 'video/add', 'POST')->allowCrossDomain();
Route::rule('editVideo', 'video/edit', 'GET')->allowCrossDomain();
Route::rule('modifyVideo', 'video/modify', 'PUT')->allowCrossDomain();
Route::rule('deleteVideo', 'video/delete', 'DELETE')->allowCrossDomain();

/* 音频 */
Route::rule('voiceList', 'voice/list', 'GET')->allowCrossDomain();
Route::rule('addVoice', 'voice/add', 'POST')->allowCrossDomain();
Route::rule('editVoice', 'voice/edit', 'GET')->allowCrossDomain();
Route::rule('modifyVoice', 'voice/modify', 'PUT')->allowCrossDomain();
Route::rule('deleteVoice', 'voice/delete', 'DELETE')->allowCrossDomain();

/* 文章 */
Route::rule('articleList', 'article/list', 'GET')->allowCrossDomain();
Route::rule('addArticle', 'article/add', 'POST')->allowCrossDomain();
Route::rule('editArticle', 'article/edit', 'GET')->allowCrossDomain();
Route::rule('modifyArticle', 'article/modify', 'PUT')->allowCrossDomain();
Route::rule('deleteArticle', 'article/delete', 'DELETE')->allowCrossDomain();


/* 管理员 */
Route::rule('adminList', 'admin/list', 'GET')->allowCrossDomain();
Route::rule('addAdmin', 'admin/add', 'POST')->allowCrossDomain();
Route::rule('editAdmin', 'admin/edit', 'GET')->allowCrossDomain();
Route::rule('modifyAdmin', 'admin/modify', 'PUT')->allowCrossDomain();
Route::rule('deleteAdmin', 'admin/delete', 'DELETE')->allowCrossDomain();
Route::rule('checkAdmin', 'admin/check', 'POST')->allowCrossDomain();
Route::rule('login', 'admin/login', 'POST')->allowCrossDomain();
Route::rule('logout', 'admin/logout', 'POST')->allowCrossDomain();

/* 系统 */
Route::rule('system', 'system/index', 'GET')->allowCrossDomain();
Route::rule('modifySystem', 'system/modify', 'POST')->allowCrossDomain();

/* API */
Route::rule('sendSms', 'index/sendSms', 'GET')->allowCrossDomain();
Route::rule('uploadImage', 'index/uploadImage', 'POST')->allowCrossDomain();
Route::rule('uploadVoice', 'index/uploadVoice', 'POST')->allowCrossDomain();
Route::rule('uploadVideo', 'index/uploadVideo', 'POST')->allowCrossDomain();
